home *** CD-ROM | disk | FTP | other *** search
- BATCH FILES IN THIS COLLECTION
-
- Of the many batch files I have, I find I use these the most.
- They will display their function and syntax if their names are
- entered with no arguments.
-
- COPY?.BAT
-
- These copy a list of files from the current directory to
- the drive that replaces the "?" in the file name.
-
- DELX.BAT
-
- Extends your DEL command to take a list of files to delete.
-
- SHO.BAT
-
- Feeds multiple files to SHOW.COM, one after the other.
-
- DO.BAT
-
- A generalization of the above. An alternative to the FOR
- loop for doing multiple operations. Some operations are
- much easier with DO, or possible only with DO. For example
- to copy FILE1, FILE2, MY.FIL and LONGFILE.TXT from the
- current directory to \TMP, enter:
-
- DO copy \tmp FOR file? my.fil longfile.txt
-
- Having said that, some operations are easier with the FOR
- construct. In a sense DO turns the order of the normal
- batch FOR and DO operators around and has a much easier
- syntax.
-
- HERE.BAT (Much improved version by Alan Dawson)
-
- Marks your place in the disk for a quick return. Useful
- when you are in some complex directory and want to go
- elsewhere and return to it without typing some long
- directory name.
-
- Just say "HERE" to remember the current drive and
- directory, and you can return to it with the "RET" command.
-
- If you end your AUTOEXEC.BAT with
-
- IF EXIST RET.BAT RET
-
- then after any reboot you will wind up in the drive and
- directory where you last said "HERE."
-
- RET will also accept a command in the form RET COMMAND.
- It will change to the directory and then execute the
- command.
-
- Examples: RET CLS, RET WP MYDOC
-
- APATH.BAT
-
- A simple path manipulator. APATH NEWDIRECTORY will
- append NEWDIRECTORY to your path. APATH with no argument
- will restore your original path. If a directory has
- already been appended by APATH, the command APATH
- NEWDIRECTORY will change the appended directory.
-
- If your original path is
- C:\WINDOWS;C:\DOS;C:\WP
- then the command APATH C:\TMP will make it
- C:\WINDOWS;C:\DOS;C:\WP;C:\TMP
- If you now type APATH C:\TEST your path will become
- C:\WINDOWS;C:\DOS;C:\WP;C:\TEST
- If you type only APATH your path will be restored to
- C:\WINDOWS;C:\DOS;C:\WP
-
- It is instructive to trace this one with CMON. You'll see
- how to make variants that prepend a directory, etc. (This
- was actually an example made for a course some years ago.)
-
- SOUNDS.BAT
-
- Drives BEEPER.COM with "clip" sounds. See BEEPER.DOC.
-
- COLORS.BAT
-
- Shows ANSI color attributes. Useful with ESCAPE.COM.
- (Needs ANSI.SYS or similar.)
-